
public class Main {
	public static int fac(int x) {
		if(x==0)
			return 1;
		return x*fac(x-1);
	}
	public static void main(String[] args ) {	
		int sum;
		sum=fac(2)+fac(5)+fac(9)+fac(3);
		System.out.println(sum);
	}		 
}